﻿@model SubjectDetailModel
@{
    CssLink.Add("~/Content/css/attachment.css");
}

<div class="controls pull-right">
    <div class="btn-group">
        <a class="btn dropdown-toggle btn-small" data-toggle="dropdown">보기<span class="caret"></span></a>
        <ul class="dropdown-menu">
            <li><a href="@Url.SubjectDetail(Model.주제.ID)">주제 보기로 돌아가기</a></li>
            <li><a href="@Url.SubjectHistory(Model.주제.ID)">주제 편집내역 보기</a></li>
        </ul>
    </div>
</div>

<h1>@Model.주제.총제목 <small>(제거된 항목)</small></h1>
<hr />

@if(Model.하위주제목록.Count > 0) {
    <h2>제거된 하위주제</h2>
    <div class="주제목록">
        <div style="width:10px;"></div>
        <div>
            @foreach (var 하위주제 in Model.하위주제목록) {
                <a href="@Url.SubjectDetail(하위주제.ID)" class="btn btn-small btn-info" >@하위주제.제목</a>
            }
        </div>
    </div>
    <hr />
}

<h2>제거된 글 목록</h2>

<table class="table table-condensed table-bordered" id="주제목차">
    <thead>
        <tr><th></th>
            <th>글 제목</th>
            <th>작성자</th>
            <th>편집일</th></tr>
    </thead>
    <tbody>
        @{ int 번호 = 1; }
        @foreach(var 글 in Model.글목록) {            
            <tr onclick="document.location='#@글.코드';">
                <td>@(번호++).</td>
                <td>
                    @글.제목 
                    @if (글.전산소만) { <span class="mytag">전산소</span> }
                </td>
                <td>@글.작성자</td>
                <td>@글.생성일.ToYMDHM()</td>
            </tr>
        }
    </tbody>
</table>

@foreach(var 글 in Model.글목록) {
    <a id="@글.코드"></a>
    <hr />
    <div class="controls pull-right">
        <a onclick="글제거취소(@글.ID)" class="btn btn-small">글 제거 취소</a>
    </div>
    <div class="글제목">
        <i class="icon-play"></i>
        @글.제목            
        @if (글.전산소만) { <span class="mytag">전산소</span> }
    </div>
    <div id="첨부파일목록_@글.ID" class="첨부파일목록">
        @{ Html.RenderAction_FileList(글.ID, 1); }
    </div>
    <div class="글내용">
        @Html.Raw(글.내용)
    </div>
}

<hr />
